import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/login.vue"),
    meta: {},
  },
  {
    path: "/home",
    name: "home",
    component: () => import("@/views/home/home.vue"),
    meta: {},
  },
  {
    path: "/order_list",
    name: "order_list",
    component: () => import("@/views/order/order_list.vue"),
    meta: {},
  },
  {
    path: "/order_details",
    name: "order_details",
    component: () => import("@/views/order/order_details.vue"),
    meta: {},
  },
  {
    path: "/carParking",
    name: "carParking",
    component: () => import("@/views/carParking/carParking.vue"),
    meta: {},
  },
  {
    path: "/entryCar",
    name: "entryCar",
    component: () => import("@/views/entryCar/entryCar.vue"),
    meta: {},
  },
  {
    path: "/carDetails",
    name: "carDetails",
    component: () => import("@/views/carDetails/carDetails.vue"),
    meta: {},
  },
  {
    path: "/setting",
    name: "setting",
    component: () => import("@/views/setting/setting.vue"),
    meta: {},
  },
  {
    path: "/setting_version",
    name: "setting_version",
    component: () => import("@/views/setting/setting_version.vue"),
    meta: {},
  },
  {
    path: "/carForm",
    name: "carForm",
    component: () => import("@/views/carForm/carForm.vue"),
    meta: {},
  },
  {
    path: "/searchCar",
    name: "searchCar",
    component: () => import("@/views/searchCar/searchCar.vue"),
    meta: {},
  },
  {
    path: "/payCar",
    name: "payCar",
    component: () => import("@/views/payCar/payCar.vue"),
    meta: {},
  },
  {
    path: "/moneyChange",
    name: "moneyChange",
    component: () => import("@/views/moneyChange/moneyChange.vue"),
    meta: {},
  },
  {
    path: "/ImagePreview",
    name: "ImagePreview",
    component: () => import("@/views/ImagePreview/ImagePreview.vue"),
    meta: {},
  },
];

const router = new VueRouter({
  routes,
  scrollBehavior() {
    return { x: 0, y: 0 };
  },
});

export default router;
